<!-- 机构招聘 -->
<template>
	<view class="container">
		<view class="c-cell" @click="toOrgRecruitDetail">
			<u-cell-group>
				<u-cell v-for="item in resumeList" :key="item.id" icon="file-text" :title="item.name" :label="item.school" value="钢琴老师" size="large" :data-id="item.id"></u-cell>
			</u-cell-group>
		</view>
		<view class="c-empty" v-if="resumeList.length==0">
			<u-empty icon="/static/empty/list.png" text="无更多简历" textSize="18" marginTop="25%" width="80%"></u-empty>
		</view>
	</view>
</template>

<script>
	export default {
		name:"",
		data() {
			return {
				// 简历列表
				resumeList:[],
				query:{
					page:1,
					page_size:20
				}
			}
		},
		onLoad() {
			this.getOrgResume()
		},
		onReachBottom(){
			this.query.page+=1
			this.getOrgResume()
		},
		methods: {
			// 跳转简历详情
			toOrgRecruitDetail(e){
				this.navigateTo(`orgRecruitInfo?id=${e.target.dataset.id}`)
			},
			// 获取简历列表
			getOrgResume(){
				this.$http.getOrgResume(this.query).then(res=>{
					this.resumeList = this.resumeList.concat(res.data)
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.container{
		.c-cell{
			background-color: #fff;
		}
	}
</style>
